package com.ymatou.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Logger {
	
	private static final String FORMAT_LOG = ">>> %s [%s] %s";
    private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    
    private static String getCurTime() {
        return DATE_FORMAT.format(new Date(System.currentTimeMillis()));
    }

    public static void log(String tag, String message) {
        System.out.println(String.format(FORMAT_LOG, getCurTime(), tag, message));
    }
}
